package com.qfedu.service.impl;

import com.qfedu.dao.SysCarMapper;
import com.qfedu.pojo.SysCar;
import com.qfedu.service.SysCarService;
import com.qfedu.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysCarServiceImpl implements SysCarService {
    @Autowired
    SysCarMapper sysCarMapper;
    @Override
    public BaseResult findcar(Integer cid) {
        SysCar sysCar=sysCarMapper.findcar(cid);
        BaseResult baseResult=new BaseResult();
        baseResult.setCode(1);
        baseResult.setInfo(sysCar);
        return baseResult;
    }

    @Override
    public BaseResult findByPrice(Integer getid) {
       List<SysCar> cars= sysCarMapper.findByPrice(getid);
        BaseResult baseResult = new BaseResult();
        baseResult.setCode(1);
        baseResult.setInfo(cars);
        return baseResult;
    }

    @Override
    public BaseResult findByNumber(Integer getid) {
        List<SysCar> cars= sysCarMapper.findByNumber(getid);
        BaseResult baseResult = new BaseResult();
        baseResult.setCode(1);
        baseResult.setInfo(cars);
        return baseResult;

    }
}
